Imports Castle.ActiveRecord


''' <summary>
'''	Gerado por MyGeneration usando o template ActiveRecord Object Mapper-1.0.3
'''	Criado em 14/08/2010 00:29:39
''' </summary>
''' <remarks></remarks>

<Serializable(), ActiveRecord("ramo", DynamicUpdate:= true)> _
Public Class Ramo
	Inherits ActiveRecordBase(Of Ramo)
	
	Private _cd_ramo As Integer
	Private _ramo_descricao As String


    Private _Pessoas As IList(Of Model.Pessoa)

	<PrimaryKey(PrimaryKeyType.Sequence, SequenceName:="ramo_cd_ramo_seq")> _
	Public Property cd_ramo() As Integer
		Get
			Return _cd_ramo
		End Get
		Set(ByVal value As Integer)
			_cd_ramo = value
		End Set
	End Property

	<[Property]("ramo_descricao")> _
	Public Property ramo_descricao() As String
		Get
			Return _ramo_descricao
		End Get
		Set(ByVal value As String)
			_ramo_descricao = value
		End Set
	End Property

    <HasAndBelongsToMany(GetType(Model.Pessoa), Table:="pessoaramo", ColumnKey:="cd_ramo", ColumnRef:="cd_pessoa", Inverse:=True, Lazy:=True)> _
    Public Property Pessoa() As IList(Of Model.Pessoa)
        Get
            Return _Pessoas
        End Get
        Set(ByVal value As IList(Of Model.Pessoa))
            _Pessoas = value
        End Set
    End Property
End Class
